package cn.edu.nit.sys.mapper;

import cn.edu.nit.sys.entity.Equip;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author xiaobai
 * @Date 2022/9/24 20:37
 * @Version 1.0.0
 */
@Mapper
public interface EquipMapper extends BaseMapper<Equip> {

    // 获取设备类型
    @Select("select name from sys_equip_type")
    List<String> getEquipType();

    @Select("select id, name, position, volume from sys_equip where state_id = '1' and substr(position, 1, 1) in ('N', 'S')")
    List<Equip> getAllEquip();
}
